//
//  SEGActivityListModel.m
//  ExcellentHome
//
//  Created by 揭婧雯 on 2017/8/11.
//  Copyright © 2017年 陈区. All rights reserved.
//

#import "SEGActivityListModel.h"
#import "SEGUtils.h"

#import <Commom/SEGServerManager.h>
#if __has_include(<Commom/SEGServerManager.h>)
#import <Commom/SEGServerManager.h>
#else
#import "SEGServerManager.h"
#endif

@implementation SEGActivityListModel

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _actPic = [NSArray array];
        _endTime = @"";
        _actName = @"";
        _actStatus = @"";
        _isRecommend = @"";
        _joinCount = @"";
        _readCount = @"";
        _startTime = @"";
        _actType = @"";
        _actId = @"";
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{}
- (void)setActPic:(NSArray*)actPic{
    NSMutableArray *arrM = [NSMutableArray array];
    [actPic enumerateObjectsUsingBlock:^(NSString* obj, NSUInteger idx, BOOL* _Nonnull stop) {
        if ([obj length] > 0) {
            [arrM addObject:[NSString stringWithFormat:@"%@%@", kClientImageRootURL, obj]];
        }
    }];
    _actPic = [arrM copy];
}
- (void)setEndTime:(NSString*)endTime{
    _endTime = [[SEGUtils ValueToString:endTime]copy];
}
- (void)setActName:(NSString*)actName{
    _actName = [[SEGUtils ValueToString:actName]copy];
}
- (void)setActStatus:(NSString*)actStatus{
    _actStatus = [[SEGUtils ValueToString:actStatus]copy];
}
- (void)setIsRecommend:(NSString*)isRecommend{
    _isRecommend = [[SEGUtils ValueToString:isRecommend]copy];
}
- (void)setJoinCount:(NSString*)joinCount{
    _joinCount = [[SEGUtils ValueToString:joinCount]copy];
}
- (void)setReadCount:(NSString*)readCount{
    _readCount = [[SEGUtils ValueToString:readCount]copy];
}
- (void)setStartTime:(NSString*)startTime{
    _startTime = [[SEGUtils ValueToString:startTime]copy];
}
- (void)setActType:(NSString*)actType{
    _actType = [[SEGUtils ValueToString:actType]copy];
}
- (void)setActId:(NSString*)actId{
    _actId = [[SEGUtils ValueToString:actId]copy];
}

@end
